package g11.actionutil;

import g11.dao.DAOException;
import g11.model.Employee;
import g11.model.Patient;

import java.util.List;

public interface PatientUtil {

	/*
	 * (1)if the pemission is "belong to", then first check if the patient is
	 * already "belong to" the doctor or another doctor if not, then create the
	 * assignment, (2) if the permission is "read only", then check if the
	 * patient/doctor combination is already existed, if not create the entry
	 */
	public boolean assignPatientToDoctor(Patient patient, Employee doctor,
			byte permission) throws Exception;

	/*
	 * these two methods have moved to PatientAssignmentDaoImpl public
	 * List<Patient> getPatientByDoctorBelongTo(Employee doctor) throws
	 * Exception;
	 * 
	 * public List<Patient> getPatientByDoctorReadOnly(Employee doctor) throws
	 * Exception;
	 */
	/*
	 * this function check if the patient and the doctor has relationship,then
	 * call DeletePatientAssignment(Employee doctor, Patient patient) in
	 * PatientAssignmentDao
	 */
	public boolean revokePatientToDoctor(Patient patient, Employee doctor)
			throws Exception;

	/*
	 * moved to PatientAssignmentDaoImpl, the patients should be the doctor's
	 * default patientspublic List<Patient>
	 * getPatientByKeywordForDoctor(Employee doctor, String patientName) throws
	 * Exception;
	 * 
	 * public List<Employee> getAllNotAssignedDoctorListForPatient(Patient
	 * patient) throws Exception;
	 */

	public Employee getDefaultDoctorByPatientId(int patientId) throws Exception;

	public List<Patient> getPatientByStaffBelongTo(Employee staff)
			throws DAOException;

}
